package Tests;

import static org.junit.Assert.*;

import org.junit.Test;

import Accounts.CreditCard;

public class CreditCardTest {
	public CreditCardTest()
	{
		testCreditCard();
		testCreditCardLimit();
		testPay();
	}

	@Test
	public void testCreditCard() {
		CreditCard defaultCard = new CreditCard("Test","test2", "test3", "test4", "test5" );
		assertNotNull("The card object is null", defaultCard);
	}

	@Test
	public void testCreditCardLimit() {
		CreditCard limitCard = new CreditCard("Test","test2", "test3", "test4", "test5",2000 );
		assertNotNull("The card object is null", limitCard);
	}

	@Test
	public void testPay() {
		CreditCard defaultCard = new CreditCard("Test","test2", "test3", "test4", "test5" );
		assertFalse("Not false",defaultCard.pay(2500));
		assertTrue("not True", defaultCard.pay(2501));
		CreditCard limitCard = new CreditCard("Test","test2", "test3", "test4", "test5",2000 );
		assertFalse("Not false",limitCard.pay(2000));
		assertTrue("not True", limitCard.pay(2001));
	}

}
